package com.zangs.emqx_expand.system.domain;

import com.zangs.emqx_expand.common.annotation.Excel;
import com.zangs.emqx_expand.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * api对象 api
 * 
 *
 * @since 2025-01-16
 */
public class Api extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    public Api(String id, String methodName, String url, String requestMethod, String remark, Boolean signature) {
        this.id = id;
        this.methodName = methodName;
        this.url = url;
        this.requestMethod = requestMethod;
        this.signature = signature;
        setRemark(remark);
    }

    /** id */
    private String id;



    /** 接口方法 */
    @Excel(name = "接口方法")
    private String methodName;

    /** url */
    @Excel(name = "url")
    private String url;

    /** 请求方式 */
    @Excel(name = "请求方式")
    private String requestMethod;

    /** 是否需要验签 */
    @Excel(name = "是否需要验签")
    private Boolean signature;

    public void setId(String id) 
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }

    public void setMethodName(String methodName) 
    {
        this.methodName = methodName;
    }

    public String getMethodName() 
    {
        return methodName;
    }
    public void setUrl(String url) 
    {
        this.url = url;
    }

    public String getUrl() 
    {
        return url;
    }
    public void setRequestMethod(String requestMethod) 
    {
        this.requestMethod = requestMethod;
    }

    public String getRequestMethod() 
    {
        return requestMethod;
    }
    public void setSignature(Boolean signature) 
    {
        this.signature = signature;
    }

    public Boolean getSignature() 
    {
        return signature;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("methodName", getMethodName())
            .append("url", getUrl())
            .append("requestMethod", getRequestMethod())
            .append("remark", getRemark())
            .append("signature", getSignature())
            .toString();
    }
}
